
local CommonOHOH = _G.CommonOHOH;
local M = CommonOHOH.class.new(script, script.Parent.base,script.Parent.Name);


function M.new(self,...)
	return M(self,...);
end;

function M.ctor(self, parent)
	M.super.ctor(self, parent);
	self.DataBase=self.parent:GetComponent(_G.ServerOHOH.load.Server_PlayerDataComponent())
	self:InitData()


	-- print("获取PVP数据----》")
	-- local a=_G.server:GetComponent(_G.ServerOHOH.load.Server_PVPDataStoreCtrl()):GetPvpDataStoreByRankId(1000)

	-- for k,v in pairs(a:GetPvpPlayer(5)) do

	-- 	print(k,v)
	-- end

end;

function M.dtor(self)
	M.super.dtor(self);
end;

--存档
function M.Save(self)
	 local baseStore=self.DataBase:GetData("base")
	 baseStore.Lucky=self.BaseLucky
	 baseStore.RollSpeed=self.BaseRollSpeed
	 baseStore.ShinyLuck=self.BaseShinyLucky
	 baseStore.RainbowLuck=self.BaseRainbowLucky
	 baseStore.VoidLuck=self.VoidLuck
	 self.DataBase:Execut(function()
	 end);
	 self.parent:SynchDataToClient("base")
end


return M
